<template>
  <el-config-provider :locale="zhCn">
      <ThemeProvider>
          <RouterView />
      </ThemeProvider>
      
  </el-config-provider>
  <div class="first-loading">
      <div class="dot"><i></i><i></i><i></i><i></i></div>
  </div>
</template>

<script setup>
import { RouterView } from 'vue-router'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import ThemeProvider from '@/layout/components/ThemeProvider'

</script>

<style lang="scss" scoped>
#app * + .first-loading {
  display: none;
}

* {
  margin: 0;
}

.first-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #7fa4bd 45%, #4a92b9 65%, #26a0da 85%, #3eade2);
}

.first-loading .dot {
  animation: first-loading-rotate 1.2s infinite linear;
  transform: rotate(45deg);
  position: relative;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
}

.first-loading .dot i {
  width: 12px;
  height: 12px;
  position: absolute;
  display: block;
  background-color: #ffc34a;
  border-radius: 100%;
  opacity: 0.5;
  animation: first-loading-opacity 1s infinite linear alternate;
}

.first-loading .dot i:nth-child(1) {
  top: 0;
  left: 0;
}

.first-loading .dot i:nth-child(2) {
  top: 0;
  right: 0;
  animation-delay: 0.4s;
}

.first-loading .dot i:nth-child(3) {
  right: 0;
  bottom: 0;
  animation-delay: 0.8s;
}

.first-loading .dot i:nth-child(4) {
  bottom: 0;
  left: 0;
  animation-delay: 1.2s;
}

@keyframes first-loading-rotate {
  to {
      transform: rotate(405deg);
  }
}

@keyframes first-loading-opacity {
  to {
      opacity: 1;
  }
}
</style>